package com.cheng.service;

import com.cheng.common.exception.CommonException;
import com.cheng.data.entity.UserInfoEntity;
import com.cheng.data.entity.UserRoleEntity;

import java.util.List;

/**
 * @author: ChengJW
 * @date: 2021/11/14 14:24
 * @version: 1.0
 * @description: 用户-角色中间表操作
 */
public interface UserRoleService {

    /**
    * @author: ChengJW
    * @params: [entity]
    * @return: int
    * @date: 2021/11/14
    * @description: 插入一条用户-角色中间表信息
    */
    int insertUserRoleInfo(UserRoleEntity entity) throws CommonException;


    /**
    * @author: ChengJW
    * @params: [entity]
    * @return: int
    * @date: 2021/11/14
    * @description: 修改 用户-角色信息
    */
    int updateUserRoleInfo(UserRoleEntity entity) throws CommonException;

    /**
    * @author: ChengJW
    * @params: [entity]
    * @return: java.util.List<com.cheng.data.entity.UserRoleEntity>
    * @date: 2021/11/14
    * @description: 查询 用户-角色信息
    */
    List<UserRoleEntity> queryUserRoleInfo(UserRoleEntity entity) throws CommonException;

    /**
    * @author: ChengJW
    * @params: [entity]
    * @return: void
    * @date: 2021/11/14
    * @description: 删除 用户-角色信息
    */
    void deleteUserRoleInfo(UserRoleEntity entity) throws CommonException;
}
